#pragma once

#include "scubserver.h"
#include "Method.h"
#include<vector>
#include<string>

struct MinesweeperOptions
{
	bool m_bVariables;
	bool m_bDataTypes;
	bool m_bFunctions;
	bool m_bAttributes;
	bool m_bNoHeading;
	bool m_bReport;
	bool m_bListOnly;
	bool m_bModeQuiet;
	bool m_bNoNumbering;

	MinesweeperOptions()
	{
		m_bDataTypes = true;
		m_bFunctions = true;
		m_bVariables = true;
		m_bAttributes = true;
		m_bNoHeading = false;
		m_bReport = false;
		m_bListOnly = false;
		m_bModeQuiet = false;
		m_bNoNumbering = false;
	}
};

struct Datalyzer :
    public Scubserver
{
private:
	Scope*	m_pxCurrentScope;
	int		m_nSerialNumber;

public:
    virtual void onNewToken(Scope& inScope, Token& inToken);
    virtual void onScopeEntry(Scope& inNewScope, Scope& inOldScope);
    virtual void onScopeExit(Scope& inNewScope, Scope& inOldScope);


	virtual void setScope(Scope& inScope)
	{
		m_pxCurrentScope = &inScope;
	}

	void printScopeSymbols(Scope* pxScope, MinesweeperOptions* pxOpt);
	void print(MinesweeperOptions* pxOpt);
    Datalyzer(void);
    ~Datalyzer(void);
};
